package j01static;



class Cat{
    //实例属性，必须new
    int age=3;

    //静态属性，不需要new
    static int blood = 100;

    //全局变量的感觉
    static double pi=3.14;
    static void say(){
        System.out.println("苗");
    }

    static int sum(int a,int b){
        return a+b;
    }
}


public class J1 {
    public static void main(String[] args) {
        Cat cat = new Cat();
        System.out.println("cat.age = " + cat.age);

        System.out.println(Cat.blood);
        System.out.println(cat.blood);
        Cat.say();
    }
}
